#include "StdAfx.h"
#include "AABB.h"

#include "FEngineType.h"

namespace FEngine
{

	AABB::AABB()
	{
		mMaxPoint = Vector3(-FLT_MAX, -FLT_MAX, -FLT_MAX);
		mMinPoint = Vector3(FLT_MAX, FLT_MAX, FLT_MAX);
	}
	
	AABB::AABB(const Vector3& _minPoint, const Vector3& _maxPoint)
		: mMinPoint(_minPoint), mMaxPoint(_maxPoint)
	{
	}

	AABB::~AABB()
	{
	}
	
	Vector3 AABB::center() const
	{
		return (mMaxPoint + mMinPoint) / 2.0f;
	}

	void AABB::setMaxPoint(const Vector3& _point)
	{
		mMaxPoint = _point;
	}
	
	Vector3 AABB::getMaxPoint() const
	{
		return mMaxPoint;
	}

	void AABB::setMinPoint(const Vector3& _point)
	{
		mMinPoint = _point;
	}
	
	Vector3 AABB::getMinPoint() const
	{
		return mMinPoint;
	}

} // namespace FEngine
